package com.rc.saas.tenant.service.acct;

import com.rc.saas.tenant.config.UpYunConfig;
import com.rc.saas.tenant.mapper.acct.AcctWithdrawInvoiceMapper;
import com.rc.saas.tenant.model.acct.AcctWithdrawInvoice;
import com.rc.saas.tenant.model.acct.AcctWithdrawInvoiceExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author frog
 * @date 2021/2/8
 */
@Service
public class AcctWithdrawInvoiceServiceImpl implements AcctWithdrawInvoiceService {

    @Autowired
    private AcctWithdrawInvoiceMapper acctWithdrawInvoiceMapper;

    @Autowired
    private UpYunConfig upYunConfig;

    @Override
    public AcctWithdrawInvoiceMapper getMapper() {
        return acctWithdrawInvoiceMapper;
    }

    @Override
    public List<AcctWithdrawInvoice> listInvoiceByApplyId(Long withdrawApplyId) {
        List<AcctWithdrawInvoice> acctWithdrawInvoices = acctWithdrawInvoiceMapper.listInvoiceByApplyId(withdrawApplyId, upYunConfig.getDownloadRoot());
        return acctWithdrawInvoices;
    }
}
